package com.example.eschool.activity;

import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.FragmentManager;

import com.example.eschool.R;

public class ErweimaActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_erweima);
    }
    @Override
    public void onBackPressed() {
        super.onBackPressed();
        // 返回到HomeFragment
        FragmentManager fragmentManager = getSupportFragmentManager();
        fragmentManager.popBackStack("HomeFragment", FragmentManager.POP_BACK_STACK_INCLUSIVE);
    }
    public void goBackToHomeFragment(View view) {
       onBackPressed(); // 关闭当前的 ErweimaActivity
    }
}